package com.ny.demo429;

import com.ny.test.BankPay;
import com.ny.test.Pay;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        int money = 100;
        System.out.println("你的消费的金额是:"+money);
        System.out.println("请选择支付方式:1.银行卡 2.微信 3.支付宝");
        Scanner scanner = new Scanner(System.in);
        switch (scanner.nextInt()){
            case 1:
                Test zi1=new Zi();
                zi1.pay(money);
                break;
            case 2:
                System.out.println("扣款的是微信:");
                Test zi2 = new Zi();
                zi2.pay2(money);
                break;
            case 3:
                System.out.println("扣款的是支付宝:");
                Test zi3 = new Zi();
                zi3.pay2(money);
                break;
        }
    }
}
